import Vue from 'vue'
import App from './App.vue'
import less from 'less'
import axios from 'axios'
import router from './router'
import './assets/css/iconfont.css'
import { Button, Table, TableColumn, FormItem, Form, Input, Col, TimePicker, DatePicker, Container, Header, Aside, Main, Menu, Submenu, MenuItem, Card, Pagination, Breadcrumb, BreadcrumbItem, Row, Dialog, Footer, Message, Select, Option, MessageBox, Upload } from 'element-ui'
import './assets/css/index.css'
import './assets/js/iconfont.js'
import './assets/css/base.css'
import common from './components/commFunction/common.js'
import qs from 'qs'
// import 'babel-polyfill'
// import '@vue/cli-plugin-babel'
// import '@babel'
// import 'babel-polyfill'
Vue.config.productionTip = false
Vue.prototype.$http = axios
Vue.prototype.$qs = qs
    // Vue.use(router)
Vue.use(Button)
Vue.use(Table)
Vue.use(Input)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(TableColumn)
Vue.use(Col)
Vue.use(TimePicker)
Vue.use(DatePicker)
Vue.use(Container)
Vue.use(Header)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(Card)
Vue.use(Pagination)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Row)
Vue.use(Dialog)
Vue.use(Footer)
    // Vue.use(Message)
Vue.use(less)
Vue.use(Select)
Vue.use(Option)
Vue.use(Upload)
    // Vue.component(Message.name, Message)
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
    // Vue.component(Message.name, Message)
Vue.prototype.$common = common
Vue.filter("dateFormat", function(value) {
    var das = new Date(value)
    let Y = das.getFullYear()
    let M = das.getMonth() + 1
    if (M < 10) {
        M = ('0' + M)
    }
    let D = das.getDate()
    if (D < 10) {
        D = ('0' + D)
    }
    return (Y + '年' + M + '月' + D + '日')
})
new Vue({
    render: h => h(App),
    router
}).$mount('#app')